<?php
/**
 * Description of IndexView
 *
 * @author Animus Inc.
 */
// Restrict Unrestricted Access

defined("_dispatch") or	die("Access Denied !");

// Constants

define('DOMROOT', dirname(dirname(__FILE__)));

// Imports
require_once DOMROOT.'/dependencies/lib/Twig/Autoloader.php';
require_once DOMROOT.'/classes/abstract/View.php';

class IndexView extends View{
    
    private $_attributes;
    
    public function __construct() {
                 
        // Starting and configuring the Twig templating engine
        
        Twig_Autoloader::register();
        
        $loader = new Twig_Loader_Filesystem(DOMROOT.'/templates');
        
        $twig = new Twig_Environment($loader, array('cache' => DOMROOT.'/compilation_cache','auto_reload' => TRUE ));
        
        $this -> _template = $twig ->loadTemplate('userbase.html');
        
    }
    
    public function output() {
        
        $this ->_template -> display(array(
            
                                'menubar' => '<a href="/stockworldmarket/new-user/register.php">Register</a>
                                              <a href="/stockworldmarket/admin/">Admin Login</a>
                                                <a href="/stockworldmarket/test/">Test</a>'
            
        ));
    }
    public function setViewData($attributes){
        $this->_attributes = $attributes;
        return true;
    }
    
    public function getViewData(){
        return $this->_attributes;
    }
}

?>
